﻿package org.dm.3d.Actions.object 
{
	import org.dm.3d.Actions.Action;
	import org.dm.3d.geom.Num3D
	import org.dm.3d.geom.MathExtend;
	/**
	 * ...
	 * @author Scott
	 */
	public class Car extends Action
	{
		private var goalPos:Array;
		private var goalNum:uint;
		private var _init:Boolean = false;
		private var _pre:Boolean;
		private var _root:Boolean = false;
		private var _cur:uint;
		private var _speed:uint = 80;
		
		public function Car() 
		{
			this.isUsed = true;
			goalPos = new Array();
			var points:Vector.<Number> = Vector.<Number>([-307.9,89,88.9,-312.3,89,77.2,-300.7,89,84.2,-294.9,89,92,-321.1,89,29.5,-321.9,89,4.3,-312.2,89,5.3,-309.9,89,30.2,-318.1,89,-46.3,-314.8,89,-74,-309.8,89,-44.7,-318.3,89,61,-306.6,89,55.6,-296.8,47,110.9,-307.6,54,84.1,-311.5,71,81.7,-304,68,98,-318.7,72,29.7,-319.9,72,4.4,-321.9,82,4.3,-321.1,83,29.5,-317.2,82,-46.1,-314.6,83,-73.9,-314.8,84,-74,-318.1,83,-46.3,-315.1,72,55.6,-316.9,83,55.2,-284.1,33,127.4,-291.2,62,112.5,-288.1,63,114,-277.3,34,126.4,-293.6,89,102,-288.7,89,102.1,-271.9,24,134.5,-268.2,24,134.7,-296.5,45,111.3,-307.3,53,84.1,-314.6,71,55.7,-318.3,71,29.7,-319.6,71,4.4,-317.1,81,-46.1,-129.1,-70,90.5,-185.7,-43,105.7,-164.8,-44,114.1,-118,-71,97.2,-235.9,-7,125.4,-206.7,-14,138.2,154.8,-85,111.3,153.6,-85,113.6,203.8,-66,124.7,201.4,-67,121.8,-281,2,48.4,-290.6,10,50.5,-287.2,10,83.9,-277.5,1,75.6,-306.3,39,56.5,-298.7,31,85.6,-287.7,13,-53.5,-310.5,46,-53.9,-312,43,-27.6,-289.2,12,-36.7,-311.7,42,-1.2,-292,11,-6.9,-282.1,6,-7.4,-278.2,8,-36.9,-289.5,23,108.5,-282.3,10,99.4,-273.5,1,92.5,-271,7,116.1,-263.1,-1,108.7,-276.6,16,122.7,-284,32,126,-271.7,23,134.1,-304.6,42,84.2,-295,37,117.1,-292.7,10,25.7,-283.9,4,25,-308.9,43,27,-259.2,14,149.3,-252.6,6,140.8,-246.5,0,134.4,-259.8,15,151.3,-217.1,2,172.5,-215.5,-2,161.5,-212.4,-7,149.8,-217.6,3,175.2,-255.8,18,144.3,-221.8,12,159.9,257.6,-49,127.8,257.8,-48,131,-17.1,-96,85.8,39.1,-100,90,39.7,-100,88,-18.7,-96,83.8,98.2,-97,100.6,99,-97,98.9,-113.9,-71,98.8,-161.6,-44,115.2,-161.2,-43,114.1,-113.5,-69,98.1,-16.8,-94,85.6,-204.2,-13,137.4,39,-99,89.9,97.9,-96,100.4,153,-81,113.4,201.4,-58,121.8,253.5,-39,124.2,-215,3,176.1,-213,18,162.1,-206.2,27,161.9,-211.5,10,172.6,-190.2,24,152.3,-202.4,7,155.3,-210.9,7,171,-192.4,28,160.9,-198.4,6,138.3,-190,21,140.5,-198.7,8,137.5,-189.6,23,139.6,-211.7,9,173.2,-194.6,32,163.7,-196.1,36,155.7,-194.5,33,163.3,-178.9,42,158.3,-182.3,46,161.3,-177.5,38,152.3,-178.1,36,143.3,-177.7,37,142.5,-187.2,47,153.6,-183.1,46,160.8,-144.1,68,167.5,-144.4,65,162.3,-165.5,51,153.9,-166.9,53,158.1,-143.2,64,155.8,-164.4,49,146.6,-164.1,51,146,-142.5,65,155.1,-168.1,57,161.8,-143.9,70,170.8,-146.3,71,170.1,-160,70,157.6,-103.7,84,185.7,10,78,216.9,-28.7,78,208.3,-28.4,83,215.8,10.9,82,224.4,14.5,78,206,-25.2,77,199.1,-24.9,79,198.5,16.1,79,206.1,-29.4,87,220.2,13.3,87,230.2,-104.3,82,187.4,-104.2,80,184.6,-105,77,179.8,-104.2,75,171.3,-103.4,76,170.8,-177.6,57,153.4,-169.9,57,161.2,-68,86,201,-68.7,84,203,-68.2,81,199.5,-68.7,78,193.4,-66.6,76,184.6,-66.1,77,184,181.7,-21,245.1,174.4,-12,259.6,202,-7,270,210.5,-20,245.9,159.1,-10,253,162,-18,242.1,129.1,3,257.8,156,0,263.4,129,-4,245.8,129.5,-9,235.6,163.8,-21,232.5,166.9,-23,216.7,132.3,-11,221.2,100.6,5,234,103.9,3,220.3,73.3,22,229.6,76.5,20,217.7,48.8,43,224.9,51.4,41,213.8,27.5,63,220.8,30.4,62,210,36,67,235.9,31.7,63,228.8,53.1,50,239.9,51.2,44,233.3,76.2,30,245.3,75.4,25,238.2,102.1,14,251.4,101.8,8,243.4,186.7,-25,231.3,215.8,-26,230.8,102.6,15,251.5,129.7,4,257.8,76.9,30,245.5,53.8,50,240,37.4,67,236.2,14.5,88,228.5,193.9,-29,214,194.2,-25,214.1,167.2,-19,216.8,132.8,-8,221.3,104.8,6,220.5,77.7,23,218,53.2,43,214.2,32.8,63,210.7,155.9,0,263.8,169.3,-1,267.1,169.2,-1,267.4,-318.2,66,-19.2,-318.5,67,4.2,-316.2,76,-46,-313.2,65,56.3,-316.5,68,30.2,-304.7,42,84.2,-295.1,38,117.5,-318.5,67,-19.1,-318.8,67,4.2,-316.5,77,-46,-313.4,66,56.5,-316.8,68,30.3,-214.1,2,173.4,-212.5,-3,162.4,-209.6,-8,150.9,-275.5,8,-52.1,-28.6,88,218,27.2,88,217,118.3,66,244.2,49.2,67,227.6,119.8,51,246.5,64.6,50,234.1,87.4,30,242.2,126.9,32,248.2,135.6,22,250.2,112.8,17,249.9,146.8,14,252.9,139.9,8,255.1,156.7,4,260.3,169.9,3,264.2,189.7,6,269.7,187,1,268.7,155.3,10,254.5,170.5,7,257.8,189.5,9,261.3,222.1,-28,208.6,222.6,-25,207.7,237.3,-17,228,229.7,-14,244.1,203.9,11,272,210,5,268.9,207.3,15,265.5,245.2,-19,205.4,242.8,-16,204.9,238.1,-17,228.2,230.6,-13,244.3,228.5,-10,243.8,236.5,-13,227.8,220.3,19,271,226.4,13,266,222.1,21,261.7,244.1,-15,204.8,246.5,-18,205.1,237.2,0,244.2,245.1,-2,228.5,242.4,-13,204.9,253.4,-4,203.5,252.2,-2,202.8,236.3,10,258.1,251.1,28,251.6,251,19,245,239,30,257.7,202.6,-6,270.6,204.4,-2,266.7,221.2,3,263.3,244.9,9,243.2,252.6,7,229.1,259.5,5,203.2,257.6,7,203.1,258.8,19,230.3,264.9,17,204.2,261.4,29,234.3,242.2,32,255.9,255.8,34,235.6,267.5,29,204.5,264,34,203.4,240.8,-14,205.1,285.4,-47,67,280.1,-47,89.2,281.6,-46,89.6,286.9,-46,67.4,276.2,-39,87.8,282.3,-40,66.3,283.3,-29,87.1,287.6,-29,67.6,262.7,19,204.1,264.3,28,204.4,261.6,33,203.2,252.2,33,236.8,-320,72,-18.8,-321.5,82,-19.1,-319.8,71,-18.8,-321.5,89,-19.1,-313.3,89,-17.8,-286.7,15,-67.3,-310.5,50,-72.9,-313.9,77,-73.7,-236,89,-216.8,-223,89,-213.8,-231.7,89,-209.4,-245.1,89,-208.3,-274.3,89,-169.4,-264,89,-165.1,-277.1,89,-143.9,-286.2,89,-147.2,-305.4,89,-100.1,-297.3,89,-97.9,-249.7,89,-186.4,-257.7,89,-196.4,-216.3,47,-231.5,-228.5,68,-223.2,-242.5,71,-211.9,-237.9,54,-212.3,-272.1,72,-168.5,-274.3,83,-169.4,-286.2,82,-147.2,-284.5,72,-146.4,-304.6,82,-99.9,-305.4,83,-100.1,-259.1,83,-190.6,-257.3,72,-190.1,-197.5,33,-240.6,-191.9,34,-236.7,-207.1,63,-230.4,-210.6,62,-230.5,-212.9,89,-220.1,-217.4,89,-222.1,-183.5,24,-241.6,-180.1,24,-240.1,-215.9,45,-231.8,-237.6,53,-212.2,-256.9,71,-190,-271.7,71,-168.5,-284.2,71,-146.4,-304.4,81,-99.9,-75.3,-70,-138.5,-62.3,-71,-139.6,-96.7,-44,-175.6,-119.1,-43,-177.4,-155.3,-7,-217.4,-123.5,-14,-215.8,188.2,-85,-30.7,234.6,-67,-19.3,238,-66,-20.8,188.1,-85,-33.3,-230,2,-168.5,-214.8,1,-191.3,-219.8,10,-203.1,-237.6,10,-174.7,-229.3,31,-209.7,-249,39,-187,-281.4,13,-80.2,-275.3,12,-95.9,-291.7,43,-114.2,-302,46,-90,-264.6,11,-123.8,-279.6,42,-137.7,-265.5,8,-90.8,-255.9,6,-119,-208.4,10,-214.8,-210.9,23,-226.1,-203.6,1,-204.7,-187.1,-1,-214.5,-190.8,7,-224.7,-192.9,16,-233.1,-198.1,32,-239.3,-183.5,23,-241.1,-211.9,37,-236.2,-235.2,42,-211.1,-250.6,10,-153.4,-243,4,-148.9,-264.5,43,-161.8,-163.4,6,-238.6,-165.5,14,-249.2,-160.8,0,-230.1,-165.2,15,-251.2,-121,-2,-240.6,-117.5,2,-251.2,-123.4,-7,-228.7,-116.7,3,-253.8,-164.7,18,-243.2,-127.3,12,-242,287.5,-49,0.3,289.2,-48,-2.4,22.8,-96,-84.5,20.5,-96,-83.3,74.7,-100,-61.1,75.1,-100,-63.1,132.8,-97,-46.3,132.7,-97,-44.4,-57.9,-71,-139.2,-57.9,-69,-138.4,-93.5,-43,-174,-93.4,-44,-175.1,23,-94,-84.2,-121.6,-13,-214,75,-99,-63.1,132.4,-96,-46.3,234.6,-58,-19.3,187.5,-81,-33.3,282.3,-39,1.6,-114,3,-253.5,-112.4,10,-248.8,-112.5,27,-236.8,-118.5,18,-240,-102.4,24,-221.1,-100.6,28,-229.8,-112.6,7,-247,-112,7,-229.2,-116,6,-212.3,-107.5,21,-210.5,-116.6,8,-211.6,-107.5,23,-209.5,-101.3,32,-233.3,-112.4,9,-249.4,-101.4,33,-232.9,-106.2,36,-226.8,-89.6,42,-221.5,-91.3,46,-225.7,-95.6,36,-207.6,-91.1,38,-215.4,-95.7,37,-206.7,-92.3,46,-225.6,-99.2,47,-220.9,-54.3,68,-214.2,-79,53,-215.9,-79.6,51,-211.5,-57,65,-209.7,-81.8,49,-204.5,-58.8,64,-203.3,-81.8,51,-203.8,-58.4,65,-202.4,-52.7,70,-217,-78.4,57,-219.7,-55.2,71,-217.5,-10.1,84,-212.4,-73,70,-212.4,105.6,78,-189.7,109.7,82,-196,70.6,83,-205.9,67,78,-199.3,66,77,-189.5,104.8,78,-178,66,79,-188.9,106.3,79,-177.3,114.5,87,-200.2,71.7,87,-210.2,-11,80,-211.7,-9.9,82,-214.3,-13.9,77,-207.8,-17,75,-199.8,-16.5,76,-199,-80.3,57,-220,-90.6,57,-216.5,28.9,84,-212.3,28.6,86,-210.3,27.8,81,-208.9,24.6,78,-203.8,22.5,76,-194.9,22.7,77,-194.2,271.9,-21,-138.5,298,-20,-126.4,301.1,-7,-151.7,271.8,-12,-154.7,255.2,-10,-155.6,252.9,-18,-144.5,230.4,3,-173.2,225,-4,-162.6,257,0,-166.3,220.9,-9,-153.2,216.9,-11,-139.1,245.9,-23,-119.6,250.3,-21,-135.2,194.3,5,-164.6,191.2,3,-150.9,167.9,22,-172.9,165.5,20,-160.8,143.9,43,-179.6,141.2,41,-168.5,123,63,-185.4,120.8,62,-174.5,130.3,63,-190.7,137.3,67,-195.1,149.8,44,-186.1,154.4,50,-191.1,173.6,25,-179.7,177.6,30,-185.6,199.6,8,-172.5,203.4,14,-179.6,270.2,-25,-123.9,296.1,-26,-110.4,203.9,15,-179.4,231,4,-173,178.2,30,-185.5,155.1,50,-190.9,138.7,67,-194.8,114.8,88,-198.1,246.3,-19,-119.5,269.2,-25,-105.1,269,-29,-105.1,217.5,-8,-138.9,192.1,6,-150.7,166.7,23,-160.5,143.1,43,-168.1,123.2,63,-174,257.1,0,-166.7,270.6,-1,-163.7,270.6,-1,-164,-283.3,67,-145.6,-293.5,66,-124.5,-303.6,76,-99.6,-255.3,65,-189.9,-269.9,68,-168.1,-211.8,38,-236.6,-235.3,42,-211.1,-283.5,67,-145.8,-293.7,67,-124.7,-303.9,77,-99.7,-255.4,66,-190.2,-270.1,68,-168.3,-114.4,2,-250.6,-117.8,-3,-240.1,-120.4,-8,-228.5,-269.9,8,-76,71.4,88,-207.9,121.1,88,-182.1,145.5,67,-181.8,214.7,66,-165.9,162.1,50,-180.8,217.1,51,-167.3,186.2,30,-177.8,224.2,32,-165.6,212.3,17,-173.5,232.9,22,-163.6,238.9,8,-166,244.1,14,-161,256.3,4,-163.3,269.8,3,-160.8,287.2,1,-157.3,290,6,-156.9,252.4,10,-158.6,267.5,7,-154.8,286.1,9,-149.5,291.9,-25,-86.7,291.8,-28,-87.8,314,-17,-98.4,314.4,-14,-116.2,307.8,5,-147.2,303.7,11,-152.7,303.8,15,-145.3,308.6,-16,-75.2,311,-19,-74.6,314.9,-17,-98.2,313.2,-13,-98.6,313.2,-10,-116.4,315.3,-13,-115.9,321.2,13,-137.3,317.9,19,-144.5,315.4,21,-135.4,309.8,-15,-74.6,312.1,-18,-73.8,321.3,-2,-95.4,321.2,0,-113,308.3,-13,-75.5,316.1,-2,-69.2,317.6,-4,-69.3,326.6,10,-125.8,333.9,19,-107.5,336.9,28,-113.3,328.8,30,-124.2,301.9,-2,-147.7,302,-6,-152,315.3,3,-137.2,327.6,9,-108.7,328.2,7,-92.6,322.8,5,-66.4,321.1,7,-67,334.3,19,-90.8,328.1,17,-64.8,338.4,29,-93.3,333.9,34,-96.9,330.9,32,-121.2,330.6,29,-63.9,327,34,-64.5,307,-14,-76.3,292,-46,45.1,290.6,-47,44.8,286.4,-39,44.4,292.4,-29,48.1,326.1,19,-65.7,327.7,28,-65.2,324.7,33,-65.3,331.3,33,-99.6,-294.9,72,-125.6,-296.4,82,-126,-294.7,71,-125.6,-296.4,89,-126,-288.4,89,-123.6,219.3,-46,130.2,247.8,-37,126.2,219.1,-43,138.9,219.1,-49,123,185,-61,134.7,183.7,-69,118.7,186.5,-49,150,156.3,-80,113.2,157.1,-68,137.6,129.3,-75,140.4,128.8,-92,107.7,158.2,-49,161.4,129.8,-49,172.7,99.3,-95,101.4,98.5,-76,141.9,67.7,-76,143.4,69.7,-98,95,99.4,-42,175.3,68.9,-34,177.9,36.5,-98,89.8,36.9,-73,143,6.1,-69,142.6,3.3,-98,84.6,38.6,-24,177.3,8.4,-15,176.7,-23.9,-92,87.4,-22.1,-64,142.1,-50.5,-59,141.7,-51.1,-86,90.2,-18,-10,173.9,-44.6,-5,171,-79.5,-78,94.2,-78.1,-52,139.5,-105.7,-45,137.2,-107.9,-71,98.3,-72.1,-6,165.5,-99.6,-6,160.1,-131.8,-58,105.1,-135.3,-37,135.5,-164.9,-29,133.8,-155.6,-46,112,-132.8,-11,152.5,-166,-15,144.8,-171.9,-36,120.4,-179.5,-24,133.2,-194.1,-18,132.6,-188.1,-25,128.7,-181.1,-15,141.3,-196.1,-14,137.8,-204.1,-13,137.2,-204.4,-13,137.2,-204.1,-13,137.2,248,-37,126.1,233.6,-48,-51.1,237,-49,-51.2,273.1,-42,-9.8,270,-40,-10.2,193,-48,-96.5,196.4,-50,-96.7,140.7,-33,-128.1,141.1,-33,-128.8,86,-14,-153.9,86.5,-13,-154.4,36.1,-5,-172.3,36.2,-4,-173,-17.9,-6,-187.1,-17.9,-5,-187.8,-84.2,-14,-203,-84.2,-13,-203.6,-121.8,-11,-213.8,-121.7,-12,-213.8,-114.2,-13,-210.8,-114.5,-14,-210.2,-122.1,-13,-213.2,314.2,-5,-71.3,314.5,-5,-70.2,292,-24,-85.6,292,-23,-86.5,308,-7,19,317.1,-2,-26.8,325.8,13,-21.8,317.2,13,21.4,325.2,22,-67.1,325.6,22,-66.2,320.1,8,-68.2,319.7,8,-69.2,330.6,42,-61,329.8,41,-64.2,330.9,47,-12.9,321.6,32,22.4,322,31,22.5,331.3,46,-13,298.9,-27,16.6,295.2,-26,16.2,238.7,-18,-131.6,239.3,-17,-131.5,269.7,-26,-103.2,269.4,-26,-102.7,160.6,22,-162.9,160.8,23,-162.5,119.2,68,-174.5,118.9,67,-175.2,112.3,73,-177,112.7,73,-176.8,112.5,73,-177.6,-26.6,78,-199.3,-26.7,79,-198.7,45,77,-191.2,45.1,76,-191.9,-89.6,50,-204.3,-89.7,50,-203.6,-121.8,-11,-213.8,98.2,80,-180.2,98.4,79,-180.8,281.5,-38,-47.2,308.4,-19,-31.8,255.5,-39,-78.1,212.2,-32,-119.1,150.3,-7,-152.9,102.1,32,-177,42.8,36,-191.4,-21.5,37,-196.8,-87.7,21,-203.3,330.1,47,-59.9,-116.9,-1,-212,-117.3,9,-211.5,-117.5,9,-210.9,316.7,31,53.8,311.1,13,52.5,304.1,-6,50.9,293.6,-26,48.4,297,-26,49.2,316.3,32,53.8,307.2,32,92.7,307.6,31,92.8,301.9,13,91.5,294.9,-6,89.8,287.9,-26,88.2,284.4,-26,87.4,195.4,-26,212,209.4,-25,209.4,209.2,-25,210,195.5,-26,212.5,155.1,-18,224.1,175.2,-22,218.1,175.6,-21,218.4,155.7,-17,224.3,113.6,3,220.7,113.1,2,220.8,21.6,73,208.5,21.6,73,209.1,22.1,73,208.6,-18.5,78,198.2,-18.7,77,198.8,7.5,79,205.7,7.6,80,205.1,-78.6,78,178.6,-78.8,77,179.2,-45,76,191.9,-44.8,77,191.3,-141.8,64,154.1,-141.9,64,154.7,-112.6,78,166.5,-112.4,79,165.9,-199.3,9,137.1,-171.2,50,143,-171.1,50,142.3,-199.2,9,136.4,-204.3,-13,136.5,-204.3,-12,137.2,-204.3,-11,137.2,50.2,45,213.2,49.8,44,213.6,71.2,22,217.4,71.5,23,217.1,254.4,-33,123.2,246.4,-29,166.7,231,-38,167.6,237.2,-40,129.5,284.3,-7,120.1,293.5,13,122.1,281.9,13,164.6,271.9,-2,165.2,129.8,-48,172.4,158.1,-48,161.1,165.4,-35,192.4,136.9,-32,201.1,101.7,-19,202.5,99.3,-40,174.9,39.5,12,203.9,38.7,-24,176.7,68.9,-33,177.4,66.5,-7,203.8,-17.1,34,197.2,-17.9,-10,173.2,8.5,-14,176.1,12.7,32,203.3,-76.9,36,178.5,-71.9,-5,164.9,-44.4,-5,170.4,-46.4,36,188.4,-138,29,154.8,-132.6,-10,151.8,-99.4,-6,159.5,-106.9,37,166.6,-196.1,-14,137.2,-165.9,-14,144.2,-169.1,21,143,-199.2,-1,137.7,-204.3,-11,137.2,236.8,-15,204.9,236.2,-14,205.7,222.9,-23,207.5,223.3,-24,206.7,261.2,22,205,255.3,8,204.4,256.2,8,203.6,262,22,204.3,268.8,42,201.9,266.7,41,204.4,186.4,-48,149.8,211.8,-44,139.6,212.4,-39,175.7,193.9,-39,183.7,28.4,67,209.8,28.9,68,209.3,290.9,46,159.2,298.3,31,123.2,297.9,32,123.1,275,-27,118.2,271.5,-26,116.9,290.5,47,158.9,268.8,47,200.7,250.3,-5,203,261.9,-19,165.8,249.5,-5,203.8,254.4,-46,-18.9,258.1,-43,-26.8,278.1,-37,-2.6,251,-49,-12.5,217.3,-69,-24.4,225.7,-61,-38.2,233.8,-49,-51.2,190.3,-80,-31.7,163.3,-92,-39,178.3,-75,-68.1,202,-68,-53.1,193.2,-49,-96.8,213.5,-49,-74,134,-95,-46.5,104.7,-98,-54,124.5,-76,-98.2,151.4,-76,-83.2,140.9,-34,-128.6,167.1,-42,-112.7,72.7,-98,-64.1,40.6,-98,-74.2,69,-69,-124.9,96.7,-73,-111.5,86.3,-15,-154.5,113.6,-24,-141.5,17.5,-92,-88.9,-5.6,-86,-103.5,17.9,-59,-149.4,43.4,-64,-137.1,36.2,-5,-173,61.2,-10,-163.7,-29.2,-78,-119.8,-52.8,-71,-136.1,-33.5,-45,-169.9,-7.8,-52,-159.7,-17.8,-6,-187.7,9.1,-6,-180.3,-71.1,-58,-152.8,-89.4,-46,-169.6,-88,-29,-193.2,-60.8,-37,-181.6,-84.1,-15,-203.6,-51,-11,-195.7,-100.2,-36,-184.3,-111,-25,-199.1,-114.7,-18,-205.2,-101.4,-24,-199.2,-114.1,-14,-210.8,-99.1,-15,-207.2,-121.9,-13,-213.9,-121.6,-13,-213.8,-121.6,-13,-213.8,278.2,-37,-2.4,-38,-94,51.9,-63.4,-90,50.4,-50.7,-87,77.1,-25.7,-92,75.7,-102.8,-80,51,-90.1,-79,80.6,-162.1,-64,54.1,-149.1,-62,86.7,-218.5,-39,58.4,-205.8,-36,97.6,-252,-17,60.7,-238,-16,102.7,-278,2,63.3,-272,1,93.8,-260.9,-1,103.9,-38.4,-96,27.2,-68.2,-90,23.9,-106.5,-81,23.2,-163.7,-65,22.4,-219.8,-39,20.8,-251.9,-17,21.5,-283.4,4,20.6,-36.2,-96,4.9,-64.1,-91,-0.4,-102.9,-82,-7.1,-160.9,-65,-17,-216.6,-40,-25.6,-248.9,-17,-29.4,-276.7,7,-33.4,-30.6,-96,-19.5,-57.9,-91,-26.9,-95.8,-82,-37.9,-152.4,-65,-54.5,-206.2,-40,-71.3,-236.9,-17,-82.1,-263.6,7,-90.6,-10.9,-94,-63.4,10.6,-92,-79.3,-11,-87,-91.6,-34.3,-90,-73.4,-44.7,-79,-112.3,-69.3,-80,-91.5,-94.8,-62,-144.1,-121,-64,-120.7,-140.8,-36,-179.1,-169.6,-39,-149.6,-167.3,-16,-198,-198.6,-17,-166.6,-187.3,-1,-209.2,-201.7,1,-205.1,-220.6,2,-180.5,-50.3,-90,-51.8,-22.2,-96,-41.5,-85,-81,-68.2,-136.5,-65,-93,-187.5,-39,-116.6,-215.9,-17,-131.5,-244.6,4,-144.7,10.5,-97,76.1,42.2,-99,79.4,37.6,-100,64.1,4.8,-98,58.3,102.2,-96,91.3,99.3,-99,76.3,160.2,-84,100,158.8,-86,86,209.9,-64,107.3,209.9,-68,94.1,228.4,-57,109,229.9,-61,96.7,240.5,-55,108.8,254.8,-47,99.6,232.1,-62,81.1,34.5,-102,40.1,0.3,-100,32.3,97.5,-100,54.3,158.2,-88,66.7,210.6,-69,77.3,36.5,-102,22.9,2.2,-100,14,99.7,-102,38.5,160.4,-89,52.6,212.9,-70,64.9,234.7,-63,69.4,265,-46,81.4,7.8,-100,-10.7,42.6,-102,-3.4,106.2,-102,10.7,166.9,-89,25,219.4,-70,37.3,240.9,-63,43,274,-47,46.4,48.7,-102,-20.5,14.7,-100,-28.8,111.5,-100,-5.2,171.4,-88,10.7,223,-69,24.5,244,-62,30.7,274.5,-47,25.6,62.3,-100,-40.6,30.3,-98,-50,122.9,-99,-24.1,180.5,-86,-6.2,229.9,-68,9.2,249,-61,15.7,265.6,-56,9.9,253,-57,4.1,73.2,-99,-52.3,43.3,-97,-63.4,132.2,-96,-36.2,188,-84,-18.1,235.7,-64,-2.5,275.2,-47,24,132.3,83,245.9,130.1,83,255.2,137.4,98,256.9,139.5,98,247.6,148.7,109,259.5,150.8,109,250.2,163,117,262.7,165.1,117,253.4,178.8,119,266.3,180.9,119,257,194.6,117,269.9,196.7,117,260.6,208.9,109,273.1,211,109,263.8,220.2,98,275.7,222.3,98,266.4,227.4,83,277.4,229.6,83,268.1,230,67,277.9,232.1,67,268.6,227.4,51,277.4,229.6,51,268.1,220.2,36,275.7,222.3,36,266.4,208.9,24,273.1,211,24,263.8,194.6,17,269.9,196.7,17,260.6,178.8,14,266.3,180.9,14,257,163,17,262.7,165.1,17,253.4,148.7,24,259.5,150.8,24,250.2,137.4,36,256.9,139.5,36,247.6,130.1,51,255.2,132.3,51,245.9,127.6,67,254.7,129.8,67,245.4,173.3,87,244.3,183.3,67,246.5,163.8,77,242.1,186.7,89,247.3,198.8,83,250,204.9,70,251.4,202.8,57,251,193.3,47,248.8,179.9,45,245.7,167.8,51,243,161.6,63,241.6,178.8,67,266.3,-287,83,150.5,-289.1,83,159.8,-281.8,98,161.5,-279.7,98,152.2,-270.5,109,164.1,-268.4,109,154.8,-256.2,117,167.3,-254.1,117,158,-240.4,119,170.9,-238.3,119,161.6,-224.6,117,174.5,-222.5,117,165.2,-210.4,109,177.8,-208.2,109,168.4,-199,98,180.3,-196.9,98,171,-191.8,83,182,-189.7,83,172.7,-189.3,67,182.5,-187.2,67,173.2,-191.8,51,182,-189.7,51,172.7,-199,36,180.3,-196.9,36,171,-210.4,24,177.8,-208.2,24,168.4,-224.6,17,174.5,-222.5,17,165.2,-240.4,14,170.9,-238.3,14,161.6,-256.2,17,167.3,-254.1,17,158,-270.5,24,164.1,-268.4,24,154.8,-281.8,36,161.5,-279.7,36,152.2,-289.1,51,159.8,-287,51,150.5,-291.6,67,159.3,-289.5,67,150,-245.9,87,148.9,-235.9,67,151.1,-255.5,77,146.7,-232.5,89,151.9,-220.4,83,154.6,-214.3,70,156,-216.4,57,155.6,-226,47,153.4,-239.4,45,150.3,-251.4,51,147.6,-257.6,63,146.2,-240.4,67,170.9,225.6,83,-164.1,232.8,98,-162.4,235,98,-171.8,227.7,83,-173.4,244.1,109,-159.9,246.3,109,-169.2,258.4,117,-156.6,260.5,117,-165.9,274.2,119,-153,276.3,119,-162.3,290,117,-149.4,292.1,117,-158.7,304.3,109,-146.2,306.4,109,-155.5,315.6,98,-143.6,317.7,98,-152.9,322.9,83,-141.9,325,83,-151.3,325.4,67,-141.4,327.5,67,-150.7,322.9,51,-141.9,325,51,-151.3,315.6,36,-143.6,317.7,36,-152.9,304.3,24,-146.2,306.4,24,-155.5,290,17,-149.4,292.1,17,-158.7,274.2,14,-153,276.3,14,-162.3,258.4,17,-156.6,260.5,17,-165.9,244.1,24,-159.9,246.3,24,-169.2,232.8,36,-162.4,235,36,-171.8,225.6,51,-164.1,227.7,51,-173.4,223.1,67,-164.7,225.2,67,-174,261.9,87,-144.8,252.3,77,-147,271.8,67,-142.5,275.3,89,-141.8,287.3,83,-139,293.5,70,-137.6,291.4,57,-138.1,281.8,47,-140.3,268.4,45,-143.3,256.3,51,-146.1,250.2,63,-147.5,276.3,67,-162.3,-193.7,83,-259.5,-186.4,98,-257.8,-184.3,98,-267.2,-191.5,83,-268.8,-175.1,109,-255.3,-173,109,-264.6,-160.8,117,-252,-158.7,117,-261.3,-145,119,-248.4,-142.9,119,-257.7,-129.2,117,-244.8,-127.1,117,-254.1,-114.9,109,-241.6,-112.8,109,-250.9,-103.6,98,-239,-101.5,98,-248.3,-96.4,83,-237.3,-94.2,83,-246.7,-93.9,67,-236.8,-91.7,67,-246.1,-96.4,51,-237.3,-94.2,51,-246.7,-103.6,36,-239,-101.5,36,-248.3,-114.9,24,-241.6,-112.8,24,-250.9,-129.2,17,-244.8,-127.1,17,-254.1,-145,14,-248.4,-142.9,14,-257.7,-160.8,17,-252,-158.7,17,-261.3,-175.1,24,-255.3,-173,24,-264.6,-186.4,36,-257.8,-184.3,36,-267.2,-193.7,51,-259.5,-191.5,51,-268.8,-196.2,67,-260.1,-194,67,-269.4,-157.3,87,-240.2,-166.9,77,-242.4,-147.4,67,-237.9,-144,89,-237.2,-131.9,83,-234.4,-125.7,70,-233,-127.9,57,-233.5,-137.4,47,-235.7,-150.8,45,-238.7,-162.9,51,-241.5,-169,63,-242.9,-142.9,67,-257.7]);
			for (var i:uint = 0; i < points.length/3; i++)
			{
				goalPos.push(new Num3D(points[3 * i],points[3 * i + 1], points[3 * i + 2]));
			}
			goalNum = goalPos.length;
			_pre = true;
			_cur = 0;
		}
		public override function update(items:Array,num:uint):void 
		{
			_cur++;
			if (_pre) preMove(items, num, 750);
			if (_cur==10)
			{
				for (var i:uint = goalNum; i < num; i++)
				{
					items[i].speed = new Num3D();
					items[i].opos = new Num3D();
					items[i].acceleration = new Num3D();
					items[i].damping = .95;
				}
			}
			if (_cur < goalNum/_speed+1) 
			{
				addSpeed(items,(_cur-1)*_speed);
			}
			if (_cur >= 11  ) 
			{
				var kmax:uint = (_cur - 11) * _speed ;
				var addk:uint = _speed;
				if (kmax >goalNum)
				{
					addk =  goalNum + _speed-kmax;
					kmax = goalNum;
				}
				var tspeed:Num3D;
				var w:Number;
				var h:Number;
				if(kmax<goalNum)
					for (var k:uint = 0; k < addk; k++)
					{
						items[(_cur-11)*_speed+k].opos = items[(_cur-11)*_speed+k].pos.clone();
					}
				for (k=0; k < kmax; k++)
				{
					tspeed = items[k].opos.subtract(items[k].pos);
					items[k].damping = .7;
					tspeed.scaleBy(.1);
					items[k].acceleration = tspeed;
				}
			}/**/
		}
		
		public function addSpeed(items:Array,pcur:uint):void 
		{
			var left:uint = pcur + _speed;
			left = left > goalNum?goalNum:left;
			for (var i:uint = pcur; i <left;i++ )
			{
				var damping:Number = items[i].damping;
				damping = (1 - damping) / (1 - Math.pow(damping, 10));
				var tvc:Num3D = goalPos[i].subtract(items[i].pos);
				tvc.scaleBy(damping);
				items[i].speed = tvc;
			}
		}
		public function preMove(items:Array,num:uint,distance:Number):void
		{
			var tvc:Num3D;
			var damping:Number;
			damping = .95;
			damping = (1 - damping) / (1 - Math.pow(damping, 10));
			for (var i:uint = goalNum; i < num; i++)
			{
				tvc = MathExtend.pInRound(i, 50, distance);
				tvc.decrementBy(items[i].pos);
				tvc.scaleBy(damping);
				items[i].speed = tvc;
			}
			this._pre = false;
		}
		
	}
	
}